package cn.com.captureNetPacket.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import cn.com.captureNetPacket.model.ConfigInfo;
import cn.com.captureNetPacket.model.DeviceInfo;
import cn.com.captureNetPacket.model.ParamCondition;

@Mapper
public interface ConfigInfoMapper {

//	@Select("<script> SELECT ID,NAME,VALUE,DESCRIPTION,ISDELETE,CLUSTERSERVID FROM CONFIGINFO " + " WHERE ISDELETE=0 "
//			+ " ORDER BY ID   </script>")
	public List<ConfigInfo> readParameters();

//	@Insert("<script> INSERT INTO CONFIGINFO " + "(NAME,VALUE,DESCRIPTION,ISDELETE,CLUSTERSERVID)" + " VALUES "
//			+ "(#{name,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{description,jdbcType=VARCHAR},#{isDelete,jdbcType=DOUBLE},#{clusterServId,jdbcType=VARCHAR}) </script>")
	public void createParameters(ConfigInfo configInfo);

//	@Delete("<script> DELETE FROM  CONFIGINFO WHERE ID=#{id}</script>")
	public void removeParameters(ConfigInfo configInfo);

//	@Update("<script> UPDATE  CONFIGINFO  SET  " + " <if test=\"name != null and name != ''\"> " + "  name=#{name},</if>"
//			+ " <if test=\"value != null and value != ''\" >" + "  value=#{value}, </if>"
//			+ " <if test=\"description != null and description != ''\" >" + " description=#{description},</if>"
//			+ " <if test=\"isDelete != null and isDelete != ''\" >" + " isDelete=#{isDelete},</if>"
//			+ " <if test=\"clusterServId != null and clusterServId != ''\" >" + " clusterServId=#{clusterServId} </if>"
//			+ " WHERE ID=#{id}</script>")
	public void updateParameters(ConfigInfo configInfo);
	
	public List<ConfigInfo> searchByCondition(Integer currentPage, Integer size, ParamCondition<ConfigInfo> paramCondition);
}
